package com.gitee.wsl.scheduler.job.bean

import kotlin.time.ExperimentalTime
import kotlin.time.Instant
import kotlin.uuid.ExperimentalUuidApi
import kotlin.uuid.Uuid


@OptIn(ExperimentalTime::class)
data class ScheduledJob @OptIn(ExperimentalUuidApi::class) constructor(
    val id: String,
    val status: JobStatus,
    val runAt: Instant?,
    val statusMessage: String?,
    val retries: Int,
    val kjobId: Uuid?,
    val createdAt: Instant,
    val updatedAt: Instant,
    val settings: JobSettings,
    val progress: JobProgress
){
    val isUpdated : Boolean
        get() = createdAt == updatedAt

}